package com.recsmile.sgs;

import com.recsmile.sgs.core.Player;
import io.netty.channel.ChannelHandlerContext;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * Created by hanyuanliang on 16/8/24.
 */
public class ServerPlayer extends Player{

    private static final AtomicInteger idGenerator = new AtomicInteger(0);

    private ChannelHandlerContext ctx;

    public ServerPlayer withCtx(ChannelHandlerContext ctx) {
        this.ctx = ctx;
        setId(idGenerator.incrementAndGet());
        return this;
    }
}
